package com.zenithmind.library.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 图书作者关联创建DTO
 * 
 * @author ZenithMind
 * @since 2024-06-14
 */
@Data
@Schema(name = "图书作者关联创建DTO", description = "创建图书作者关联时的数据传输对象")
public class BookAuthorCreateDTO {

    @NotBlank(message = "图书ID不能为空")
    @Schema(description = "图书ID", example = "1", required = true)
    private String bookId;

    @NotBlank(message = "作者ID不能为空")
    @Schema(description = "作者ID", example = "1", required = true)
    private String authorId;

    @Size(max = 50, message = "作者角色长度不能超过50个字符")
    @Schema(description = "作者角色", example = "主编")
    private String authorRole;

    @Schema(description = "排序号", example = "1")
    private Integer sortOrder;
}
